import Api from "@/api/finance/betRecord";
import i18n from "@/lang/index";
const contentConfig = {
  pageName: "sys:user",
  table: {
    border: true,
    highlightCurrentRow: false,
  },
  indexAction: (data) => {
    console.log("index", data);
    return new Promise((resolve, reject) => {
      Api.getList(data).then(s => {
        console.log('data-----------------', data);
        resolve(s)
      }).catch(e => {
        reject(e)
      })
    });
  },
  deleteAction: function (id) {
    console.log("delete", id);
    return new Promise((resolve, reject) => {
      resolve({
        code: "00000",
        data: null,
        msg: i18n.global.t("hint.7"),
      });
    });
  },
  exportAction: function (queryParams) {
    // 导出Excel文件
    // return exportUser(queryParams);
  },
  pk: "id",
  toolbar: [
    "refresh",
    // "add",
    // "delete",
    // "export",
    // {
    //   name: "import",
    //   icon: "upload",
    //   text: "导入",
    //   auth: "import",
    // },
  ],
  cols: [
    // { label: "ID", align: "center", prop: "id" },
    { label: i18n.global.t("label.16"), align: "center", prop: "ulid",minWidth: 300,fixed:'left' },
    { label: i18n.global.t("label.15"), align: "center", prop: "user_id",fixed:'left' },
    { label: i18n.global.t("form.1"), align: "center", prop: "user.username",minWidth: 150,fixed: "left" },
    // { label: i18n.global.t("label.49"), align: "center", prop: "user.name",minWidth: 160  },
    // { label: i18n.global.t("label.29"), align: "center", prop: "game_id" },
    { label: i18n.global.t("label.33"), align: "center", prop: "game.name" },
    // { label: i18n.global.t("label.28"), align: "center", prop: "game_provider_id" },
    { label: i18n.global.t("label.39"), align: "center", prop: "game_provider.name" },
    { label: i18n.global.t("label.31"), align: "center", prop: "bet_amount" },
    { label: i18n.global.t("search.28"), align: "center", prop: "result_type", templet: 'custom', slotName: "result_type",minWidth: 150 },
    { label: i18n.global.t("label.32"), align: "center", prop: "win_amount" },
    { label: i18n.global.t("label.3"), align: "center", prop: "user.balance" },
    { label: i18n.global.t("label.53"), align: "center", prop: "currency_code" },
    { label: i18n.global.t("label.23"), align: "center", prop: "status", templet: 'custom', slotName: "status",minWidth: 150 },
    { label: i18n.global.t("label.46"), align: "center", type: "time", prop: "bet_at", minWidth: 180,fixed:"right" },
    // {
    //   label: "操作",
    //   fixed: "right",
    //   templet: "tool",
    //   align: "center",
    //   operat: [
    //     {
    //       name: "details",
    //       text: "查看详情",
    //     },
    //   ],
    // },
  ],
};

export default contentConfig;